import api from '../utils/http'
export default {
    getFoodData() {
        return api({
            url: '/selectAllFood',
            method: 'get',
        })
    } ,
    addFoodVegetables(foodData) {
        return api({
            url: '/addFood',
            method: 'post',
            data:foodData,
            processData: false,
            contentType: false,
        })
    },
    queryFoodVegetables(foodData) {
        return api({
            url: '/selectFoodCount',
            method: 'get',
            params:foodData
        })
    },
    editFoodVegetables(foodData) {
        return api({
            url: '/updateFoodById',
            method: 'post',
            data: {
                ...foodData
            }
        })
    },
    deleteFoodVegetables(foodData) {
        return api({
            url: '/deleteFoodById',
            method: 'post',
            data: {
                id:foodData
            }
        })
    }
}